Release 10.1A: OpenEdge Development:
Progress Dynamics Getting Started
Generating application objects
The next level of data maintained by the Repository describes application grouping components, objects that define groups of fields that are used together. This level includes the following types of objects:
- SmartDataObject (SDO) — Moves data from the database on the server to the user session on the client where it can be displayed and updated.
- Browse — Lets you scroll through, select, and update records from an SDO’s database query.
- Viewer — Lets you display and update details for a record in a frame.
The Object Generator creates all these objects from the entities you import from your application database. You can use the objects as generated or modify them to your needs. The Object Generator names the objects with their table name (or table dump name if this is shorter) and a suffix
fullofor SDOs,fullbfor Browses, andviewvfor Viewers. You can modify this naming convention and other defaults for your own applications if you wish.
![]()
To generate objects from the imported data:
- From the AppBuilder main menu, choose Build
Object Generator. The Object Generator window appears. By default, the last database you used, DynSports, is selected in the Database combo box, as shown:
![]()
- Select the DataObjects, Browses, and Viewers toggle boxes in the Generate Objects section. Since you have already created datafields in the Entity Import phase, deselect the Datafields toggle box. The corresponding tabs in the window are enabled.
- Select the arm_customer, arm_salesrep, art_order, art_orderline, and ivm_item table names in the browse.
- Choose the DataObjects tab. The information on this tab is used to create dynamic SDOs and data logic procedures (DLPs). The generated DLP has standard validation code for the entity. For your own applications, you should review this code and edit it to fit your needs. Generally, you put your business logic in the DLPs.
Note: Your root folder must be in your PROPATH. Some of the Progress Dynamics tools might not run if the directory is not in your PROPATH.- Set the Root folder to <wrk>/Tutorial, where <wrk> is your Progress Dynamics working directory. The root folder is the directory where you want any generated physical objects saved.
- Select ds-OE from the Product Module combo box in the DataObject section. The Relative Path is automatically set to the directory you chose when you defined the Product Module. The fields in the DataLogic Procedure section also update automatically.
- Select Astra for the AppServer partition.
- Deselect the Follow Joins option. If your application database has internal joins (like the DynSports database), you should deselect this option. If you leave it selected, Progress Dynamics generates a complex query to follow the internal joins that might result in filtering that returns no records. You can leave the other options in this window at their default settings, as shown:
![]()
- Choose the Viewers tab.
- Change the Number of Fields to 24 and the Maximum Fields per Column to 8, as shown:
Note: The default values are larger than you need in the tutorial. Viewers with a maximum of three columns of eight fields work better.
![]()
- Choose the Start button
to begin generating your SDOs, browses, and viewers. A message dialog box appears warning you that datafields will not be generated, as shown:
![]()
This is not a problem, since you generated data fields during the Entity Import phase.
- Choose Yes. The object generation starts. As this proceeds, the tool displays information in the Logging tab. This process can take several minutes. When the object generation process completes, a message dialog box appears:
![]()
- Choose OK to clear the message dialog box. You can export the object generation results to a log file by specifying an Export filename and choosing the Export Log button.
- Check that the process ran successfully by expanding the nodes in the TreeView. If there is a Completed node for each step, the process ran successfully, as shown:
![]()
- Exit the Object Generator.
For extra practice, you can complete this procedure for the tables in the ds-EMP product module: hrm_benefits, hrm_department, hrm_employee, and hrm_family. While these tables are not used for this tutorial, you might need them to follow examples in the programming guides. There are no objects to generate for the General module, because it is not associated with a set of tables in the DynSports database.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |